package com.example.springboot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.springboot.entity.Comment;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CommentMapper extends BaseMapper<Comment> {

    @Select("select c.*,u.nickname, u.avatar_url from news_remark as c left join news_user as u on c.userid = u.id where" +
            " c.channel_id =#{channelId} order by id asc ")
    List<Comment> findCommentDetail(@Param("channelId") Integer channelId);
}
